package com.jg.xmlSchema2JsonSchema.xsd;

import com.jg.xmlSchema2JsonSchema.xsd.util.XsdUtil;
import org.w3c.dom.Element;

public class XsComplexContent {

	private Element element;
	private String annotation;
	private String id;
	public XsComplexContent(Element element)
	{
		this.element=element;
		getData();
	}
	private void getData()
	{
		XsAnnotation xsAnnotation= XsdUtil.getAnnotation(element);
		if(xsAnnotation!=null) {
			annotation=xsAnnotation.getText();
		}
		id=element.getAttribute("id");
	}
	
	public String getAnnotation()
	{
		return annotation;
	}
	public String getId()
	{
		return id;
	}
	public XsExtension getExtension()
	{
		return XsdUtil.getExtension(element);
	}
	public Element getXmlElement()
	{
		return element;
	}
	public XsRestriction getRestriction()
	{
		return XsdUtil.getRestriction(element);
	}

}
